<html>
<head>
<META http-equiv="content-type" contentType="text/html; charset=UTF-8">
<script src="./static/jquery.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<link rel="stylesheet"
	href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />

<style type="text/css">
body {
	margin: 0px auto;
	padding: 0px 0px;
	font-family: calibri;
}

.container {
	margin: 20px 0px 0px 20px;
	width: 600px;
}

.satir,.satir_link {
	margin: 2px auto;
	padding: 0px;
	width: 100%;
	height: 26px;
	background-color: rgba(100, 100, 100, 0.1);
}

.satir_link {
	height: 35px;
}

.satir>.label {
	margin: 3px auto;
	width: 130px;
	float: left;
}

.satir>input {
	width: 200px;
	float: left;
}

#hata {
	margin: 3px auto;
	width: inherit;
	float: left;
	color: red;
}

.cariTablo {
	margin: 0 auto;
	padding: 0px;
	width: 800px;
	font-size: 11px;
}

.cariTablo>thead {
	background-color: rgba(0, 100, 0, 0.5);
	font-weight: bold;
}

.cariTablo tr:nth-child(odd) {
	background-color: rgba(0, 100, 0, 0.2);
	vertical-align: middle;
	border: 1px solid #ffffff;
	border-width: 0px 1px 1px 0px;
	padding: 1px;
	font-size: 14px;
	font-weight: bold;
	color: #000000;
}

.cariTablo tr:nth-child(even) {
	background-color: rgba(0, 200, 0, 0.3);
	vertical-align: middle;
	border: 1px solid #ffffff;
	border-width: 0px 1px 1px 0px;
	padding: 1px;
	font-size: 14px;
	font-weight: bold;
	color: #000000;
}
</style>

</head>
<body>
	<div class="container">
			<table class="cariTablo">
				<thead>
					<td style="width: 10%;">BELGE NO:</td>
					<td style="width: 10%;">CARİ KOD:</td>
					<td style="width: 80%;">CARİ AD:</td>
				</thead>
				<tr>
					<td style="width: 10%;">{{belgeNo}}</td>
					<td style="width: 10%;">{{cariKod}}</td>
					<td style="width: 80%;">{{cariAd}}</td>
				</tr>
			</table>

			<table class="cariTablo">
				{% if fis %}
				<thead>
					<td style="width: 20%;">Stok Kodu</td>
					<td style="width: 50%;">Stok İsmi</td>
					<td style="width: 5%; text-align: right;">Miktar</td>
					<td style="width: 2%;">Birim</td>
					<td style="width: 3%;">KDV</td>
					<td style="width: 10%; text-align: right;">Birim Fiyat</td>
					<td style="width: 10%; text-align: right;">Tutar</td>
				</thead>
				{% for urun in fis.urunler %}
				<tr>
					<td style="width: 20%;"><a href="{{ url_for('fatstokhar') }}?stokNo={{urun.urunkodu}}&tarih={{fis.tarih}}">{{urun.urunkodu}}</a></td>
					<td style="width: 50%;">{{urun.urunismi}}</td>
					<td style="width: 5%; text-align: right;">{{'%.3f'|format(urun.miktar)}}</td>
					<td style="width: 2%;">{{urun.birim}}</td>
					<td style="width: 3%;">{{urun.kdv}}</td>
					<td style="width: 10%; text-align: right;">{{'%.2f'|format(urun.birimfiyat)}}</td>
					<td style="width: 10%; text-align: right;">{{'%.2f'|format(urun.tutar)}}</td>
				</tr>
				{% endfor %}
				<tfoot>
					<td style="width: 20%;"></td>
					<td style="width: 50%;"></td>
					<td style="width: 5%;"></td>
					<td style="width: 2%;"></td>
					<td style="width: 3%;"></td>
					<td style="width: 10%; text-align: right;">TOPLAM:</td>
					<td style="width: 10%; text-align: right;">{{'%.2f'|format(fis.toplamtutar)}}</td>
				</tfoot>
				{% endif %}
			</table>
	</div>
</body>
</html>